﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace TestConsoleApp
{
    public class TestAnonymousMethods
    {
        private Action action;

        private Func<string, int, string> func;

        private delegate string Mydelegate(string a, int b);

        public void Test()
        {

            
            action = delegate ()
            {
                Console.WriteLine("");
            };

            action = () =>
            {
                Console.WriteLine("");
            };


            func = delegate (string a, int b)
            {
                return "";
            };

            func = (a, b) =>
            {
                return "";
            };


            Mydelegate mydelegate = delegate (string a, int b)
           {
               return "";
           };


            Mydelegate mydelegate1 = (a, b) =>
            {
                return "";
            };

        }
    }
}
